<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <%@include file="../../common/include_list_head.jsp" %>
    <script type="text/javascript" src="${basePath }/component/datepicker/WdatePicker.js"></script>

</head>
<body>
<div id="scrollContent">

    <s:if test="actionErrors.size()>0 || actionMessages.size()>0 || fieldErrors.size()>0">
        <div id="SystemErrorMessage">
            <s:actionerror/>
            <s:actionmessage/>
            <s:fielderror/>
        </div>
    </s:if>

    <s:form theme="simple" name="ysform">
        <s:hidden name="pager.formname" value="ysform"/>
        <s:hidden name="pager.currentPageno" id="yspager_currentPageno"/>
    </s:form>

    <div id="userRoleMenuButton">
        <button onclick="openEntity()"><span class="icon_add">新增</span></button>
        <button onclick="doModify()"><span class="icon_edit">修改</span></button>
        <button onclick="doRemove()"><span class="icon_delete">删除</span></button>
        <button onclick="myChangeState(1,'启用')" type="button"><span class="icon_ok" title="">启用</span></button>
        <button onclick="myChangeState(0,'禁用')" type="button"><span class="icon_no" title="">禁用</span></button>
    </div>
    <div>
        <table class="tableStyle" style="width:100%;">
            <tr>
                <th width="3%"></th>
                <th nowrap="nowrap" width="10%">定时器名称</th>
                <th nowrap="nowrap" width="10%">定时器类别</th>
                <%--<th nowrap="nowrap" width="10%">系统编号</th>--%>
                <th nowrap="nowrap" width="10%">开始时间</th>
                <th nowrap="nowrap" width="10%">时间间隔</th>
                <th nowrap="nowrap" width="10%">状态</th>
                <th nowrap="nowrap" width="10%">上次执行时间</th>
                <th nowrap="nowrap" width="10%">上次执行时长（秒）</th>
                <th nowrap="nowrap" width="10%">上次执行状态</th>
                <th nowrap="nowrap" width="10%">错误日志</th>
                <th nowrap="nowrap" width="10%">下次执行时间</th>
            </tr>
            <s:iterator value="resultData">
                <tr>
                    <td align="center"><s:checkbox id="%{wid}" name="selectNode" fieldValue="%{wid}"/></td>
                    <td nowrap="nowrap">
                        <a href="javascript:openEntity('<s:property value="wid"/>')">
                            <font color="blue"><s:property value="timername"/></font></a>
                    </td>
                    <td nowrap="nowrap"><s:property value="timercode"/></td>
                    <td nowrap="nowrap"><s:date name="starttime" format="yyyy-MM-dd HH:mm:ss"/></td>
                    <td nowrap="nowrap"><s:property value="interval"/><s:property value="intervaltype"/></td>
                    <td nowrap="nowrap">${state==1?'启用':'禁用'}</td>
                    <td nowrap="nowrap"><s:date name="lasttime" format="yyyy-MM-dd HH:mm:ss"/></td>
                    <td nowrap="nowrap">${executesecond}</td>
                    <td nowrap="nowrap">${lasttime==null?'未执行':(st==1?'成功':'失败')}</td>
                    <td nowrap="nowrap">查看</td>
                    <td nowrap="nowrap"><s:date name="nexttime" format="yyyy-MM-dd HH:mm:ss"/></td>
                </tr>
            </s:iterator>
        </table>
    </div>
    <div style="height: 45px;">
        <div id="pagelist" style="display: none">
            <s:property value="pager.postToolBar" escape="false"/>
        </div>

        <div class="clear"></div>
    </div>
</div>
</body>
</html>
